/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_overtime_line
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_overtime_line extends PO implements I_hrm_overtime_line, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121125L;

    /** the default Constructor */
    public X_hrm_overtime_line(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_overtime_line (Properties ctx, int hrm_overtime_line_ID, String trxName)
    {
      super (ctx, hrm_overtime_line_ID, trxName);
      /** if (hrm_overtime_line_ID == 0)
        {
			sethrm_dayhours (Env.ZERO);
// 0.00
			sethrm_days (0);
			sethrm_daytariff (Env.ZERO);
// 0.00
			sethrm_daytotal (Env.ZERO);
			sethrm_hourquota (Env.ZERO);
			sethrm_nighthours (Env.ZERO);
// 0.00
			sethrm_nighttariff (Env.ZERO);
// 0.00
			sethrm_nighttotal (Env.ZERO);
			sethrm_overtime_ID (0);
			sethrm_overtime_line_ID (0);
			sethrm_total (Env.ZERO);
        } */
    }

    /** Load Constructor */
    public X_hrm_overtime_line (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_overtime_line[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Date From.
		@param DateFrom 
		Starting date for a range
	  */
	public void setDateFrom (Timestamp DateFrom)
	{
		set_Value (COLUMNNAME_DateFrom, DateFrom);
	}

	/** Get Date From.
		@return Starting date for a range
	  */
	public Timestamp getDateFrom () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFrom);
	}

	/** Set End Time.
		@param EndTime 
		End of the time span
	  */
	public void setEndTime (Timestamp EndTime)
	{
		set_Value (COLUMNNAME_EndTime, EndTime);
	}

	/** Get End Time.
		@return End of the time span
	  */
	public Timestamp getEndTime () 
	{
		return (Timestamp)get_Value(COLUMNNAME_EndTime);
	}

	public org.eevolution.model.I_HR_Department getHR_Department() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Department)MTable.get(getCtx(), org.eevolution.model.I_HR_Department.Table_Name)
			.getPO(getHR_Department_ID(), get_TrxName());	}

	/** Set Payroll Department.
		@param HR_Department_ID Payroll Department	  */
	public void setHR_Department_ID (int HR_Department_ID)
	{
		if (HR_Department_ID < 1) 
			set_Value (COLUMNNAME_HR_Department_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID));
	}

	/** Get Payroll Department.
		@return Payroll Department	  */
	public int getHR_Department_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.eevolution.model.I_HR_Job getHR_Job() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Job)MTable.get(getCtx(), org.eevolution.model.I_HR_Job.Table_Name)
			.getPO(getHR_Job_ID(), get_TrxName());	}

	/** Set Payroll Job.
		@param HR_Job_ID Payroll Job	  */
	public void setHR_Job_ID (int HR_Job_ID)
	{
		if (HR_Job_ID < 1) 
			set_Value (COLUMNNAME_HR_Job_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID));
	}

	/** Get Payroll Job.
		@return Payroll Job	  */
	public int getHR_Job_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set amount salary.
		@param hrm_amountsalary amount salary	  */
	public void sethrm_amountsalary (BigDecimal hrm_amountsalary)
	{
		set_Value (COLUMNNAME_hrm_amountsalary, hrm_amountsalary);
	}

	/** Get amount salary.
		@return amount salary	  */
	public BigDecimal gethrm_amountsalary () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_amountsalary);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_dayhours.
		@param hrm_dayhours hrm_dayhours	  */
	public void sethrm_dayhours (BigDecimal hrm_dayhours)
	{
		set_Value (COLUMNNAME_hrm_dayhours, hrm_dayhours);
	}

	/** Get hrm_dayhours.
		@return hrm_dayhours	  */
	public BigDecimal gethrm_dayhours () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_dayhours);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_days.
		@param hrm_days hrm_days	  */
	public void sethrm_days (int hrm_days)
	{
		set_Value (COLUMNNAME_hrm_days, Integer.valueOf(hrm_days));
	}

	/** Get hrm_days.
		@return hrm_days	  */
	public int gethrm_days () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_days);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_daytariff.
		@param hrm_daytariff hrm_daytariff	  */
	public void sethrm_daytariff (BigDecimal hrm_daytariff)
	{
		set_Value (COLUMNNAME_hrm_daytariff, hrm_daytariff);
	}

	/** Get hrm_daytariff.
		@return hrm_daytariff	  */
	public BigDecimal gethrm_daytariff () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_daytariff);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_daytotal.
		@param hrm_daytotal hrm_daytotal	  */
	public void sethrm_daytotal (BigDecimal hrm_daytotal)
	{
		set_Value (COLUMNNAME_hrm_daytotal, hrm_daytotal);
	}

	/** Get hrm_daytotal.
		@return hrm_daytotal	  */
	public BigDecimal gethrm_daytotal () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_daytotal);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_hourquota.
		@param hrm_hourquota hrm_hourquota	  */
	public void sethrm_hourquota (BigDecimal hrm_hourquota)
	{
		set_Value (COLUMNNAME_hrm_hourquota, hrm_hourquota);
	}

	/** Get hrm_hourquota.
		@return hrm_hourquota	  */
	public BigDecimal gethrm_hourquota () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_hourquota);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_nighthours.
		@param hrm_nighthours hrm_nighthours	  */
	public void sethrm_nighthours (BigDecimal hrm_nighthours)
	{
		set_Value (COLUMNNAME_hrm_nighthours, hrm_nighthours);
	}

	/** Get hrm_nighthours.
		@return hrm_nighthours	  */
	public BigDecimal gethrm_nighthours () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_nighthours);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_nighttariff.
		@param hrm_nighttariff hrm_nighttariff	  */
	public void sethrm_nighttariff (BigDecimal hrm_nighttariff)
	{
		set_Value (COLUMNNAME_hrm_nighttariff, hrm_nighttariff);
	}

	/** Get hrm_nighttariff.
		@return hrm_nighttariff	  */
	public BigDecimal gethrm_nighttariff () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_nighttariff);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_nighttotal.
		@param hrm_nighttotal hrm_nighttotal	  */
	public void sethrm_nighttotal (BigDecimal hrm_nighttotal)
	{
		set_Value (COLUMNNAME_hrm_nighttotal, hrm_nighttotal);
	}

	/** Get hrm_nighttotal.
		@return hrm_nighttotal	  */
	public BigDecimal gethrm_nighttotal () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_nighttotal);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public I_hrm_order gethrm_order() throws RuntimeException
    {
		return (I_hrm_order)MTable.get(getCtx(), I_hrm_order.Table_Name)
			.getPO(gethrm_order_ID(), get_TrxName());	}

	/** Set hrm_order.
		@param hrm_order_ID hrm_order	  */
	public void sethrm_order_ID (int hrm_order_ID)
	{
		if (hrm_order_ID < 1) 
			set_Value (COLUMNNAME_hrm_order_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_order_ID, Integer.valueOf(hrm_order_ID));
	}

	/** Get hrm_order.
		@return hrm_order	  */
	public int gethrm_order_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_order_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_overtime gethrm_overtime() throws RuntimeException
    {
		return (I_hrm_overtime)MTable.get(getCtx(), I_hrm_overtime.Table_Name)
			.getPO(gethrm_overtime_ID(), get_TrxName());	}

	/** Set hrm_overtime.
		@param hrm_overtime_ID hrm_overtime	  */
	public void sethrm_overtime_ID (int hrm_overtime_ID)
	{
		if (hrm_overtime_ID < 1) 
			set_Value (COLUMNNAME_hrm_overtime_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_overtime_ID, Integer.valueOf(hrm_overtime_ID));
	}

	/** Get hrm_overtime.
		@return hrm_overtime	  */
	public int gethrm_overtime_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_overtime_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_overtime_line.
		@param hrm_overtime_line_ID hrm_overtime_line	  */
	public void sethrm_overtime_line_ID (int hrm_overtime_line_ID)
	{
		if (hrm_overtime_line_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_overtime_line_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_overtime_line_ID, Integer.valueOf(hrm_overtime_line_ID));
	}

	/** Get hrm_overtime_line.
		@return hrm_overtime_line	  */
	public int gethrm_overtime_line_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_overtime_line_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set total amount.
		@param hrm_total total amount	  */
	public void sethrm_total (BigDecimal hrm_total)
	{
		set_Value (COLUMNNAME_hrm_total, hrm_total);
	}

	/** Get total amount.
		@return total amount	  */
	public BigDecimal gethrm_total () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_total);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set Start Time.
		@param StartTime 
		Time started
	  */
	public void setStartTime (Timestamp StartTime)
	{
		set_Value (COLUMNNAME_StartTime, StartTime);
	}

	/** Get Start Time.
		@return Time started
	  */
	public Timestamp getStartTime () 
	{
		return (Timestamp)get_Value(COLUMNNAME_StartTime);
	}
}